{extend name="public/base" /} {block name="title"}
<title>已删除文章</title>
{__block__}
<link href="//cdn.bootcss.com/datatables/1.10.15/css/dataTables.bootstrap.min.css" rel="stylesheet">
<link href="//cdn.bootcss.com/limonte-sweetalert2/6.6.8/sweetalert2.min.css" rel="stylesheet">
<style>
    .restoreArticle :hover,
    .emptyArticle :hover {
        color: #000;
    }
</style>
<script>
    var deletedArticleUrl = "{:url('admin/article/deleted')}"
    var restoreArticleUrl = "{:url('admin/article/restore')}"
    var emptyArticleUrl = "{:url('admin/article/clear')}"
</script>
{/block} {block name="page-heading"}
<div class="col-sm-4">
    <h2>已删除文章</h2>
    <ol class="breadcrumb">
        <li>
            <a href="{:url('admin/Index/home')}">主页</a>
        </li>
        <li>
            <strong>已删除文章</strong>
        </li>
    </ol>
</div>
<div class="col-sm-8">
    <div class="title-action">
        <a href="{:url('admin/article/add')}" class="btn btn-primary">新文章</a>
        <a href="{:url('admin/article/index')}" class="btn btn-primary">全部文章</a>
    </div>
</div>
{/block} {block name="content"}
<table class="table articleTable table-striped table-hover table-condensed">
    <thead>
        <tr>
            <th></th>
            <th>标题</th>
            <th>栏目</th>
            <th>删除时间</th>
            <th>操作</th>
        </tr>
    </thead>
    <tbody>
        {foreach name="data" item="article"}
        <tr>
            <td>
                <input type="checkbox" value="{$article.id}" name="aid">
            </td>
            <td>{$article.title}</td>
            <td>
                {$article.cid|getCategoryById}
            </td>
            <td>{$article.delete_time}</td>
            <td>
                <a href="{:url('admin/article/restore',['id'=>$article['id']])}" class="text-success restoreArticle"><i class="fa fa-history"></i></a>&nbsp;&nbsp;
                <a href="javascript:void(0)" class="text-danger emptyArticle"><i class="fa fa-trash"></i></a>
            </td>
        </tr>
        {/foreach}
    </tbody>
    <tfoot>
        <tr>
            <th></th>
            <th>标题</th>
            <th>栏目</th>
            <th>删除时间</th>
            <th>操作</th>
        </tr>
    </tfoot>
</table>
<a href="javascript:void(0)" class="btn btn-primary" onclick="selectAll('aid')">全选</a>
<a href="javascript:void(0)" class="btn btn-primary" onclick="selectEmpty('aid')">全不选</a>
<a href="javascript:void(0)" class="btn btn-primary" onclick="selectReverse('aid')">反选</a>
<a href="javascript:void(0)" class="btn btn-danger" id="emptySelectedArticle">删除选定</a>
<a href="javascript:void(0)" class="btn btn-primary" id="restoreSelectedArticle">还原选定</a> {/block} {block name="script"}{__block__}
<script src="//cdn.bootcss.com/datatables/1.10.15/js/jquery.dataTables.min.js"></script>
<script src="//cdn.bootcss.com/datatables/1.10.15/js/dataTables.bootstrap.min.js"></script>
<script src="//cdn.bootcss.com/limonte-sweetalert2/6.6.8/sweetalert2.min.js"></script>
<script src="__CUSTOME__/js/admin.common.js"></script>
<script>
    $(function () {
        $(".articleTable").dataTable({
            language: {
                url: '__PLUGINS__/dataTables/Chinese.json'
            },
            "columns": [{
                "orderable": false
            }, null, null, null, {
                "orderable": false
            }],
        });
    });
</script>
{/block}